package com.bridgeintelligent.tag.webserver.dim.mgmt.service.mq;

import com.bridgeintelligent.tag.customer.service.CustomerSendMsgHandler;
import com.bridgeintelligent.tag.webserver.dim.mgmt.api.BaseCode;
import com.bridgeintelligent.tag.webserver.dim.mgmt.api.DimRep;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by JackCheung on 2019/9/22 11:36 PM.
 */
@Api(tags = "测试发送自定义标签mq")
@RestController
@RequestMapping("/api/mqTest")
@AllArgsConstructor
public class MqTestContoller {

    private SendMsgHandler sendMsgHandler;
    private CustomerSendMsgHandler customerSendMsgHandler;
    @ApiOperation(value = "新增自定义标签审批通过", notes = "自定义标签审批")
    @PostMapping("addPass")
    public DimRep addPass(String dimId, int type) {
        sendMsgHandler.sendMsg(dimId, type);
//        customerSendMsgHandler.sendMsg(dimId);
        return new DimRep(BaseCode.SUCCESS);
    }
}
